home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.10 / demo / sparx.i / .spark12.i < prev    next >
Text File  |  1995-04-19  |  963b  |  57 lines

  1.  
  2. Procedure Spark12;
  3. Const
  4.     max4lines = 40;
  5. Type
  6.     Sp1lines    = Array[1..max4lines] of line;
  7.     Sp1LinesPtr = ^Sp1Lines;
  8.  
  9. Var
  10.     arr    : Sp1LinesPtr;
  11.     cnt1,
  12.     cnt2,
  13.     CCNT,
  14.     add1,
  15.     add2,
  16.     actualline : Short;
  17.  
  18. Begin
  19.     New(arr);
  20.     ActualLine := 1;
  21.  
  22.     cnt1 := 546;    add1 := 7;    { x1 }
  23.     cnt2 := 3;    add2 := 3;    { y1 }
  24.     CCNT := 2;    { color }
  25.  
  26.     Repeat
  27.       EraseLine( Adr(arr^[actualline]) );
  28.       With arr^[actualline] do begin
  29.         x1 := 170 + XSin^[cnt1] *  6 DIV  5;    { +- max.120 }
  30.         y1 := 110 + XCos^[cnt2] * 11 DIV 10;    { +- max.110 }
  31.         x2 := dff006 MOD 320;
  32.         y2 := dff006 MOD 256;
  33.       end;
  34.  
  35.       cnt1 := cnt1 + add1;
  36.       if cnt1>627 then cnt1:= cnt1-628;
  37.  
  38.       cnt2 := cnt2 + add2;
  39.       if cnt2>627 then cnt2:= cnt2-628;
  40.  
  41.       DrawLine( Adr(arr^[actualline]), CCNT );
  42.  
  43.       inc( CCNT );
  44.       If CCNT > maxColors then CCNT := 2;
  45.  
  46.       inc( actualline );
  47.       If actualline >= max4lines then actualline := 1;
  48.  
  49.     Until LeftMouseButton;
  50.  
  51.     Ciao;
  52.     Dispose(arr);
  53.     SetSColors(Adr(Def_Colors));
  54.  
  55. End;
  56.  
  57.